/**
 * Creating a sidebar enables you to:
 - create an ordered group of docs
 - render a sidebar for each doc of that group
 - provide next/previous navigation

 The sidebars can be generated from the filesystem, or explicitly defined here.

 Create as many sidebars as you want.
 */

// @ts-check

const sidebars = {
  // By default, Docusaurus generates a sidebar from the docs folder structure
  tutorialSidebar: [
    {
      type: 'doc',
      id: 'about',
      label: 'About',
      customProps: {
        hide_title: true,
        description: 'OSS Insight is a powerful insight tool that can help you analyze any GitHub repository or developer. And you can get insights with the monthly and historical rankings as well.',
      }
    },
    {
      type: 'category',
      label: 'Workshop',
      items: [{ type: 'autogenerated', dirName: 'workshop' }],
      customProps: {
        collapsed: true
      }
    },
    {
      type: 'category',
      label: 'API (beta)',
      // @ts-ignore
      items: [
        {
          type: 'doc',
          id: 'api/ossinsight-public-api'
        },
        {
          type: 'category',
          label: 'Trends',
          collapsed: false,
          items: [
            {
              type: 'doc',
              id: 'api/list-trending-repos',
              label: 'List trending repos',
              className: 'api-method get'
            }
          ]
        },
        {
          type: 'category',
          label: 'Collections',
          collapsed: false,
          items: [
            {
              type: 'doc',
              id: 'api/list-collections',
              label: 'List collections',
              className: 'api-method get'
            },
            {
              type: 'doc',
              id: 'api/list-hot-collections',
              label: 'List hot collections',
              className: 'api-method get'
            },
            {
              type: 'doc',
              id: 'api/list-repos-of-collection',
              label: 'List collection repositories',
              className: 'api-method get'
            },
            {
              type: 'doc',
              id: 'api/collection-repo-ranking-by-stars',
              label: 'Repository ranking by stars',
              className: 'api-method get'
            },
            {
              type: 'doc',
              id: 'api/collection-repo-ranking-by-issues',
              label: 'Repository ranking by issues',
              className: 'api-method get'
            },
            {
              type: 'doc',
              id: 'api/collection-repo-ranking-by-prs',
              label: 'Repository ranking by prs',
              className: 'api-method get'
            }
          ]
        },
        {
          type: 'category',
          label: 'Issue Creators',
          collapsed: true,
          items: [
            {
              type: 'doc',
              id: 'api/list-issue-creators',
              label: 'List issue creators',
              className: 'api-method get'
            },
            {
              type: 'doc',
              id: 'api/list-countries-of-issue-creators',
              label: 'List countries/regions of issue creators',
              className: 'api-method get'
            },
            {
              type: 'doc',
              id: 'api/issue-creators-history',
              label: 'Issue creators history',
              className: 'api-method get'
            },
            {
              type: 'doc',
              id: 'api/list-organizations-of-issue-creators',
              label: 'List organizations of stargazers',
              className: 'api-method get'
            }
          ]
        },
        {
          type: 'category',
          label: 'Pull Request Creators',
          collapsed: true,
          items: [
            {
              type: 'doc',
              id: 'api/list-pull-request-creators',
              label: 'List pull request creators',
              className: 'api-method get'
            },
            {
              type: 'doc',
              id: 'api/pull-request-creators-history',
              label: 'Pull request creators history',
              className: 'api-method get'
            },
            {
              type: 'doc',
              id: 'api/list-countries-of-pr-creators',
              label: 'List countries/regions of PR creators',
              className: 'api-method get'
            },
            {
              type: 'doc',
              id: 'api/list-organizations-of-pr-creators',
              label: 'List organizations of PR creators',
              className: 'api-method get'
            }
          ]
        },
        {
          type: 'category',
          label: 'Stargazers',
          collapsed: true,
          items: [
            {
              type: 'doc',
              id: 'api/list-countries-of-stargazers',
              label: 'List countries/regions of stargazers',
              className: 'api-method get'
            },
            {
              type: 'doc',
              id: 'api/stargazers-history',
              label: 'Stargazers history',
              className: 'api-method get'
            },
            {
              type: 'doc',
              id: 'api/list-organizations-of-stargazers',
              label: 'List organizations of stargazers',
              className: 'api-method get'
            }
          ]
        },
        {
          type: 'doc',
          id: 'api/showcase',
          label: 'Showcase',
          customProps: {
            description: 'OSS Insight API Showcase',
          }
        },
      ],
      customProps: {
        collapsed: false
      }
    },
    {
      type: 'doc',
      id: 'faq',
      label: 'FAQ',
    },
  ],
  // But you can create a sidebar manually
  /*
  tutorialSidebar: [
    'intro',
    'hello',
    {
      type: 'category',
      label: 'Tutorial',
      items: ['tutorial-basics/create-a-document'],
    },
  ],
   */
};

module.exports = sidebars;
